from selenium.webdriver.common.by import By

byid = By.ID
byname = By.NAME
bycname = By.CLASS_NAME
bytname = By.TAG_NAME
bylink = By.LINK_TEXT
bycss = By.CSS_SELECTOR
byxpath = By.XPATH
byparriallike = By.PARTIAL_LINK_TEXT

url = "http://10.59.9.8:7007/boss/"






# 首页界面元素配置信息
class PayElements:
    """元素定位配置（优化后）"""
    #支付管理
    paymanagnent_loc = byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[7]/h2'
    #用户支付配置
    user_pay_loc = byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[8]/ul/li[2]/div/a'
    #添加支付配置
    addpay_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[2]/div[2]/div[1]/ul/li[1]/a/span'
    #用户编号
    usernum_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset[1]/dl[1]/dd/input'
    #用户名
    username_loc= byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset[1]/dl[2]/dd/input'
    #支付产品编号
    paynum_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset[1]/dl[3]/dd/input'
    #支付产品名称
    payname_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset[1]/dl[4]/dd/input'
    #风险预存
    danger_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[1]/div/fieldset[1]/dl[6]/dd/input'
    #提交按钮
    submit_btn= byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[3]/div/form/div[2]/ul/li[1]/div/div/button'
    #添加支付产品
    payproduct_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[4]/div[2]/div[1]/ul/li[1]/a'
    #支付产品编码
    productcode_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[5]/div/form/div[1]/div/fieldset/dl[1]/dd/input'
    #添加产品名称
    product_name = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[5]/div/form/div[1]/div/fieldset/dl[2]/dd/input'
    #提交
    submit_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[5]/div/form/div[2]/ul/li[1]/div/div/button'
    #支付产品信息
    productmsg=byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[8]/ul/li[1]/div/a'
    #设置支付方式
    paystyle = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[4]/div[2]/div[2]/div[2]/div/table/tbody/tr[1]/td[6]/div/a[1]'
    #添加支付方式
    addpaystyle = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[7]/div[2]/div[1]/ul/li[1]/a'
    #点击提交
    submit_loc2 = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[8]/div/form/div[2]/ul/li[1]/div/div/button'
    #用户支付配置
    usepay_loc = byxpath,'/html/body/div[1]/div[2]/div[2]/div[2]/div[8]/ul/li[2]/div/a'
    #添加支付配置
    payuse_loc = byxpath,'/html/body/div[1]/div[3]/div/div[2]/div[6]/div[2]/div[1]/ul/li[1]/a'





pay_pe = PayElements()


